package com.gosophia.metadataEngine.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.metadataEngine.dto.DataSourceInfoDto;
import com.gosophia.metadataEngine.ws.MetadataEngineWebService;

/**
 * 编辑数据源
 * @author wangxinbing
 * @since 2011-5-9
 */
@Controller("EditDataSourceInfoAction")
@Scope("prototype")
public class EditDataSourceInfoAction extends BaseSupportAction{
	
	private DataSourceInfoDto dataSourceinfoDto;

	@Autowired
	private MetadataEngineWebService metadataEngineWebService;
	
	public DataSourceInfoDto getDataSourceinfoDto() {
		return dataSourceinfoDto;
	}

	public void setDataSourceinfoDto(DataSourceInfoDto dataSourceinfoDto) {
		this.dataSourceinfoDto = dataSourceinfoDto;
	}

	public String _execute() throws Exception{
		metadataEngineWebService.updateDataSourceInfo(dataSourceinfoDto);
		return SUCCESS;
	}
}
